  <template>
  <div class="comprehensive">
    <div>{{ rates }}</div>
    <div class="left">
      <p>4.5</p>
      <p>综合评分</p>
      <p>高于周边商家69.2%</p>
    </div>
    <div class="line"></div>
    <div class="right">
      <p>
        <span> 服务态度 </span>

        <van-rate v-model="value" allow-half color="#fcd40d" readonly />
        <i>{{ value }}</i>
      </p>
      <p>
        <span> 服务态度 </span>

        <van-rate v-model="value" allow-half color="#fcd40d" readonly />
        <i>{{ value }}</i>
      </p>
      <p>送达时间：<span class="time"> 44分钟</span></p>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  data() {
    return {
      value: 4.5
    }
  },
  computed: {
    ...mapState(['rates'])
  }
}
</script>

<style lang="less" scoped>
.comprehensive {
  height: 120px;
  border-bottom: 1px solid #cccccc;
  background-color: #fff;
  display: flex;
  align-items: center;
  .line {
    border-left: 1px solid #ccc;
    height: 70%;
  }
  .left {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 30px;
    :nth-child(1) {
      color: #f8970a;
      font-weight: bold;
    }
    :nth-child(2) {
      font-weight: bold;
    }
    :nth-child(3) {
      color: #c8c8c8;
      font-size: 12px;
    }
  }
  .right {
    flex: 3;
    padding-left: 20px;
    font-weight: bold;
    font-size: 14px;
    line-height: 40px;
    p {
      display: flex;
      align-items: center;
      span {
        margin-right: 10px;
      }
      i {
        color: #f4a219;
        font-weight: bold;
        font-size: 14px;
        display: inline-block;
        margin-left: 5px;
        line-height: 20px;
      }
      .time {
        color: #cacaca;
      }
    }
  }
}
</style>
